Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement seamless copy-paste from Android to computer #1423

Closed
wants to merge 1 commit into from

Conversation

rom1v
Copy link
Collaborator

@rom1v rom1v commented May 23, 2020

Automatically synchronize the device clipboard to the computer any time it changes.

Refs #1056 (comment)


To test, just copy some text on the Android device while scrcpy is running, then Ctrl+v in some text area on the computer.

The other direction is not synchronized automatically, because:

  • SDL does not provide a notification mechanism to listen to clipboard changes
  • it could leak data unexpectedly (if I copy from my password manager on the computer while scrcpy is running, I don't expect my password to be copied to the device, the other direction is less problematic IMO, because it is expected that the computer can access the device)

Here are binaries so that you can test even if you don't know how to build:

  • scrcpy.exe
    SHA256: a89ce793ee5d1e9177288f5b3756986015c76d0200521ad1cb227f782bfda095
  • scrcpy-server
    SHA256: e076176b01a70554188b9728f06b3d65dab63245be19c6b33ded2939008265eb

(on Windows, replace both files in the v1.13 release; on other platforms, use scrcpy-server and follow §Prebuilt server)

Automatically synchronize the device clipboard to the computer any time
it changes.

This allows seamless copy-paste from Android to the computer.

Fixes #1056 <#1056 (comment)>
@rom1v rom1v force-pushed the seamless_copypaste branch from 5be3b85 to 0ae6887 Compare May 23, 2020 17:13
rom1v added a commit that referenced this pull request May 24, 2020
Automatically synchronize the device clipboard to the computer any time
it changes.

This allows seamless copy-paste from Android to the computer.

Fixes #1056 <#1056 (comment)>
PR #1423 <#1423>
@rom1v
Copy link
Collaborator Author

rom1v commented May 24, 2020

Merged acc4ef3

@rom1v rom1v closed this May 24, 2020
rom1v referenced this pull request in AlynxZhou/scrcpy Sep 10, 2021
@emac
Copy link

emac commented Nov 5, 2021

Doesn't work for me.

OS: MIUI 12.5.1

@rom1v
Copy link
Collaborator Author

rom1v commented Nov 5, 2021

Which scrcpy version?

scrcpy --legacy-paste

if this does not work.

@emac
Copy link

emac commented Nov 13, 2021

It's related to a specific setting on my phone. After I turn it off, it works now.

@rom1v
Copy link
Collaborator Author

rom1v commented Nov 13, 2021

@emac What was this specific setting? How to turn it off?

@emac
Copy link

emac commented Nov 13, 2021

I'm using Xiaomi phone, which has a privacy setting deciding whether an app can read content from the phone's clipboard. It has to be turned off.

@rom1v
Copy link
Collaborator Author

rom1v commented Nov 13, 2021

Could you post a screenshot of that setting, please? (for the FAQ)

@emac
Copy link

emac commented Nov 14, 2021

4687e195ff159cfc8f5c64998733e168

Here you go.

@rom1v
Copy link
Collaborator Author

rom1v commented Nov 14, 2021

Thank you.

May I ask you to switch your device to English in system settings and take another screen in English (then switch back)? 😉

@rom1v
Copy link
Collaborator Author

rom1v commented Nov 18, 2021

@emac Could you post a screehshot in English, please, that would help other people :)

@emac
Copy link

emac commented Nov 20, 2021

image

Here it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants